package com.cenntro.repair.controller;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cenntro.common.util.result.PageResult;
import com.cenntro.common.util.result.Result;
import com.cenntro.repair.common.SooidTypeEnum;
import com.cenntro.repair.model.vo.AfterRepairRefVO;
import com.cenntro.repair.service.AfterRepairRefService;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 
 * @since 2019-07-23
 */
@RestController
@RequestMapping("/repairref")
public class AfterRepairRefController {

    @Resource
    private AfterRepairRefService afterRepairRefService;

    /**
     * 
    * @Title list
    * @Description 指派人列表
    * @param key
    * @return  
    * @throws
     */
    @RequestMapping("/assignList")
    public Result list(String key, Integer devId, Integer accountType) {
        List<AfterRepairRefVO> list = new ArrayList<AfterRepairRefVO>();
        if (SooidTypeEnum.REPAIRMAN.getStatus().equals(accountType)) {
            list = afterRepairRefService.showList(key, devId);
        }
        return PageResult.ok(list);
    }
}
